<template>
  <div class="home">
    <van-card
				v-for="item in shopList"
				:key="item.id"
				:num="item.stock"
				:price="item.price"
				:desc="item.content"
				:title="item.title"
				:thumb="item.image"
				@click="$router.push('/detail/'+item.id)"
			/>
  </div>
</template>

<script>

import api from "../api"
import axios from 'axios'
// import axios from "axios"
export default {
  name: 'Home',
  components: {
    
  },
  data(){
    return {
      shopList:[]
    }
  },
  created(){
      api.getShopList().then(res=>{
        this.shopList=res.data.data
      })
  }
}
</script>
